package com.atguigu.e_loop;

public class Test4 {
    public static void main(String[] args) {
        //定义求和变量
        int sum = 0;

        //数值.fori -> 正序循环  数值.forr -> 倒序循环
        for (int i = 0; i <= 100; i += 2) {
            sum += i;
        }

        //输出结果
        System.out.println("sum = " + sum);
    }
}
